//~trade
page=start
title=Trader
text=start
Yarrr, I was shipwrecked on this forsaken spit of land a fortnight past. Me ship is in ruins and my booty is lst to the seas. But alas, I found a hoard of supplies from the hold of me dear ship. If ya have gold coin to trade, I'd be willing to let you take some of these supplies off me hands. What do ya say, lad?
text=end
button=buy,I have gold coins, what can you offer me?
button=sell,I don't have any gold, but I have ship-building materials!
button=info,You've been here longer than I have, any idea whats going on?
button=action:close,You can't help me.

page=buy 
title=Trade
text=start
If ya have the coin for it, I can part with this old flintlock pistol. There were more'n I could count when I was shipwrecked here.
text=end
button=pistol,Purchase pistol
text=start
I also have this map if you have need of it, lad. I think some of me booty is marked on there, but these old eyes can't make out the crosses.
text=end
button=map,Purchase map
text=start
Ammunition be something I have plenty of. Yarr, just make certain none of it comes back to meself at high speed.
text=end
button=ammo,Purchase 50 rounds of ammunition
text=start
Those crates used to hold mounds an' mounds of provisions for me and me mates. I'm the only scallywag left on this island, and I couldn't eat it all if I tried. A bag o coins'll net ya a decent amount of provisions.
text=end
button=food,Purchase a crate of food
button=sell,I don't have any gold, but I have ship-building materials!
button=info,You've been here longer than I have, any idea whats going on?
button=action:close,See ya later!

page=pistol
script=start
if (playergotitem(5)>=10){
	freestored "unit",1,5,10;
	$id=create("item",58);
	store $id,"unit",1;
	clear;
	add "Yarr! Thank ye kindly, sir.";
	msg_extend;
}else{
	clear;
	add "Don't be trying to fool me, ya scallywag!";
	add "Thats 10 shares of gold and no halgglin' about it!";
	msg_extend;
}
script=end
button=sell,Maybe I can afford something else...
button=action:close,Screw you!

page=map
script=start
if (playergotitem(5)>=3){
	freestored "unit",1,5,3;
	$id=create("item",73);
	store $id,"unit",1;
	clear;
	add "Yarr! Thank ye kindly, sir.";
	msg_extend;
}else{
	clear;
	add "Don't be trying to fool me, ya scallywag!";
	add "I'll not take less than 3 bags o gold!";
	msg_extend;
}
script=end
button=sell,Maybe I can afford something else...
button=action:close,Screw you!

page=ammo
script=start
if (playergotitem(5)>=1){
	freestored "unit",1,5,1;
	$id=create("item",29,10);
	store $id,"unit",1;
	clear;
	add "Yarr! Thank ye kindly, sir.";
	msg_extend;
}else{
	clear;
	add "Don't be trying to fool me, ya scallywag!";
	add "It'll be a bag of gold, nothing less!";
	msg_extend;
}
script=end
button=sell,Maybe I can afford something else...
button=action:close,Screw you!

page=provisions
script=start
if (playergotitem(5)>=2){
	freestored "unit",1,5,2;
	$id1=create("item",38,2);
	$id2=create("item",44,3);
	$id3=create("item",10,5);
	store $id1,"unit",1;
	store $id2,"unit",1;
	store $id3,"unit",1;
	clear;
	add "Yarr! Thank ye kindly, sir.";
	msg_extend;
}else{
	clear;
	add "Don't be trying to fol me, ya scallywag!";
	add "Food won't come cheap, ya hear?!";
	msg_extend;
}
script=end
button=sell,Maybe I can afford something else...
button=action:close,Screw you!

page=sell
text=start
If you have logs, branches, skin, or cordage to offer, I could see about letting some of this ammunition go...
Lets sayyy...
-12 rounds fer a log
-10 rounds fer each bundle of 10 branches you bring me
-5 rounds fer lion or monkey or raptor skin
-20 rounds fer a hundred paces of cord
text=end
button=log,I have extra logs
button=branch, I don't need these branches
button=skin, Take these skins
button=cord, I've got way too much cord, take it
button=buy,I have gold coins, what can you offer me?
button=info,You've been here longer than me, whats going on?
button=action:close,We're done here.

page=log
script=start
if (playergotitem(7)>=1){
	freestored "unit",1,7,1;
	$id=create("item",29,12);
	store $id,"unit",1;
	clear;
	add "She'll be up in no time!";
	msg_extend;
}else{
	clear;
	add "Arg, no logs for me stricken lass?";
	msg_extend;
}
script=end
button=buy,I have other things
button=action:close,Bye

page=branch
script=start
if (playergotitem(24)>=10){
	freestored "unit",1,24,10;
	$id=create("item",29,10);
	store $id,"unit",1;
	clear;
	add "She'll be up in no time!";
	msg_extend;
}else{
	clear;
	add "You've no branches for her deck?";
	msg_extend;
}
script=end
button=buy,I have other things
button=action:close,Bye

page=skin
script=start
if (playergotitem(96)>=1){
	freestored "unit",1,96,1;
	$id=create("item",29,5);
	store $id,"unit",1;
	clear;
	add "She'll be up in no time!";
	msg_extend;
}else{
	clear;
	add "Me poor girl, she needs sails!";
	msg_extend;
}
script=end
button=buy,I have other things
button=action:close,Bye

page=cord
script=start
if (playergotitem(49)>=100){
	freestored "unit",1,49,100;
	$id=create("item",29,20);
	store $id,"unit",1;
	clear;
	add "She'll be up in no time!";
	msg_extend;
}else{
	clear;
	add "Ropes be what hold it all together!";
	msg_extend;
}
script=end
button=buy,I have other things
button=action:close,Bye

page=info
title=Native
text=start
Well I aint been here long, but an old deckhand like meself picks up a thing or ten while hes around.
That fort on the edge of the island is the charge of French Legionaires. Those sons'a'bitches got firpower and they aint afraid to use it!
There's all manner of critters running around, I'd watch out for them. But what you really need to watch out for are the sharks. Them suckers are dengerous!
Good luck, mate, keep chasing th'morrow!
text=end
button=action:close,Sounds good, I'll catch you later.

// copy this and past into above
###  ( Name of trade )
trade=start
sell=xx,##   // XX= idem number  ##= number of idems
buy=xx,##
trade=end

